/**
 * Copyright (c) 2020 kedacom
 * OpenATC is licensed under Mulan PSL v2.
 * You can use this software according to the terms and conditions of the Mulan PSL v2.
 * You may obtain a copy of Mulan PSL v2 at:
 * http://license.coscl.org.cn/MulanPSL2
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PSL v2 for more details.
 **/
<template>
   <div class="base-dialog">
    <el-dialog
      custom-class="my-dialogs"
      :modal="false"
      :visible.sync="dialogVisible"
      :close-on-click-modal="false"
      :modal-append-to-body="false"
      @close="closeFormDialog"
    >
      <intersection-with-interface
        :key="isChange"
        ref="intersectionWithInterface"
        :isShowState="isShowState"
        :isShowMode="isShowMode"
        :AgentId="agentid"
      ></intersection-with-interface>
    </el-dialog>
    </div>
</template>

<script>
export default {
  name: 'nodeCard',
  props: {
  },
  data () {
    return {
      dialogVisible: false,
      isShowState: true,
      isShowMode: true,
      isChange: false,
      agentid: '0'
    }
  },
  methods: {
    closeFormDialog () {
      this.dialogVisible = false
      this.$refs.intersectionWithInterface.destroyIntersectionMap()
    },
    openEdge (dev) {
      this.isChange = !this.isChange
      this.agentid = dev.agentid
      this.dialogVisible = true
    }
  }
}
</script>
<style lang="scss">
.base-dialog{
  .el-dialog__wrapper {
    position: unset !important;
//     .el-dialog{
//       position: fixed !important;
//       left: 45%;
//       bottom: 40%;
//     }
  }
}
</style>
